package com.example.bbgds.test;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by bbgds on 2016/5/17.
 */
public class TextParcelable implements Parcelable {

    public String text;


    public TextParcelable(){

    }

    protected TextParcelable(Parcel in) {
        text = in.readString();
    }

    public static final Creator<TextParcelable> CREATOR = new Creator<TextParcelable>() {
        @Override
        public TextParcelable createFromParcel(Parcel in) {
            return new TextParcelable(in);
        }

        @Override
        public TextParcelable[] newArray(int size) {
            return new TextParcelable[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(text);
    }
}
